﻿'******************************************************
'******************************************************
'Application Title: Google Widget Editor
'version: 1.0
'Date: 01-02-2008
'Requirements: win2k or later
'Author: Andrew Pye
'Author Email: StretchMasterP@googlemail.com
'License: Released under GNU GENERAL PUBLIC LICENSE v3
'ToDo:
'Changes:Imports System.Text
'******************************************************
'******************************************************

Imports System.Windows.Forms

Public Class CodeTreeDialog

    Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub

    Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub CodeTreeDialog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If CodeTree1.Nodes.Count = 0 Then
            CodeTree1.LoadData(My.Application.Info.DirectoryPath & "\Data\Java\Java.xml")
        End If
    End Sub

    Private Sub CodeTree1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles CodeTree1.DoubleClick

    End Sub
    Private Sub CodeTree1_NodeSelected(ByRef Node As CodeStore) Handles CodeTree1.NodeSelected
        Me.lblDescription.Text = Node.Description
    End Sub
    Private Sub CodeTree1_NodeDoubleClicked(ByRef Node As CodeStore) Handles CodeTree1.NodeDoubleClicked
        frmMain.CodeTextBox1.SelectedText = Node.Code
        Me.Close()
    End Sub

    Private Sub CodeTree1_AfterSelect(ByVal sender As System.Object, ByVal e As System.Windows.Forms.TreeViewEventArgs) Handles CodeTree1.AfterSelect

    End Sub
End Class
